import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import java.io.Serializable;
import java.util.HashMap;

public class SiteMap{
    HashMap<String, Integer> siteMapPages = new HashMap<String, Integer>();

    public SiteMap() {

        siteMapPages.put("authorization", 0);
        siteMapPages.put("anime", 2);
        siteMapPages.put("admin", 3);
        siteMapPages.put("guest", 1);
        siteMapPages.put("regictration", 0);
        siteMapPages.put("manager", 2);

    }


    public boolean testTipDostypa(String page, int tipDostypa) {
        if (siteMapPages.get(page) <= tipDostypa) {
            return true;
        }
        return false;
    }

}
